package com.loby.data.mapper;

import com.loby.data.base.pojo.TMonMonitorStation;
import com.loby.data.base.pojo.TMonSourceShops;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface SourceShopsMapper {

    @Insert("insert into t_mon_source_shops values (#{pkId},#{fkPsId},#{shopName},#{shopNo},#{desc})")
    int insertShop(TMonSourceShops shop);

    @Delete("delete from t_mon_source_shops where pk_id=#{id}")
    int removeShop(@Param("id")long shopId);

    @Select("select * from t_mon_source_shops where pk_id=#{id}")
    TMonSourceShops getShopByPkId(@Param("id")long shopId);

    @Update("update t_mon_source_shops set fk_pollution_sources_id=#{fkPollutionSourcesId},shop_name=#{shopName},shop_no=#{shopNo} where pk_id=#{pkId}")
    long updateShop(TMonSourceShops shops);

    @Select("select * from t_mon_source_shops where fk_pollution_sources_id=#{id}")
    List<TMonSourceShops> getShopsByOrganizationId(@Param("id") long OrganizationId);



}
